/*
 * Copyright (c) 2006-2024 RT-Thread Development Team
 *
 * SPDX-License-Identifier: Apache-2.0
 *
 * Change Logs:
 * Date           Author          Notes
 * 2019-05-06     Zero-Free       first version
 * 2024-07-04     wdfk-prog       lptimer is register with hwtimer, only supports pm calls,the timer function is not supported
 */

#ifndef  __DRV_PMTIMER_H__
#define  __DRV_PMTIMER_H__

#include <rtthread.h>

#define BSP_USING_PM_TIMER   "lptim1"
#define BSP_USING_LPTIM1

rt_uint32_t stm32l0_lptim_get_countfreq(void);
rt_uint32_t stm32l0_lptim_get_tick_max(void);
rt_uint32_t stm32l0_lptim_get_current_tick(void);

rt_err_t stm32l0_lptim_start(rt_uint32_t load);
void stm32l0_lptim_stop(void);

int stm32l0_hw_lptim_init(void);
int drv_pm_hw_init(void);

#endif /* __DRV_PMTIMER_H__ */
